package org.jeecg.modules.mes.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.mes.entity.MesEmployeeWorkType;
import org.jeecg.modules.mes.vo.MesEmployeeWorkTypeAssignVO;

import java.util.List;
import java.util.Map;

/**
 * 员工工种关联表 Service 接口
 */
public interface IMesEmployeeWorkTypeService extends IService<MesEmployeeWorkType> {

    /**
     * 分页查询员工工种分配列表
     */
    IPage<MesEmployeeWorkType> queryPageList(Page<MesEmployeeWorkType> page, Map<String, Object> params);

    /**
     * 根据员工ID获取工种列表
     */
    List<MesEmployeeWorkType> getEmployeeWorkTypes(String employeeId);

    /**
     * 员工工种分配
     */
    Result<String> assignWorkTypeToEmployee(MesEmployeeWorkTypeAssignVO assignVO);

    /**
     * 保存员工工种分配
     */
    Result<MesEmployeeWorkType> saveEmployeeWorkType(MesEmployeeWorkType employeeWorkType);

    /**
     * 更新员工工种分配
     */
    Result<MesEmployeeWorkType> updateEmployeeWorkType(MesEmployeeWorkType employeeWorkType);

    /**
     * 删除员工工种分配
     */
    Result<String> removeEmployeeWorkType(String id);

    /**
     * 批量删除员工工种分配
     */
    Result<String> removeEmployeeWorkTypes(List<String> ids);

    /**
     * 检查员工工种分配是否存在
     */
    boolean checkEmployeeWorkTypeExists(String employeeId, String workTypeId, String excludeId);

    /**
     * 根据工种ID删除相关员工分配
     */
    void removeByWorkTypeId(String workTypeId);
}
